import { useAppSdk } from "./useAppSdk";
const usePay = () => {
	const { offlineToPay, isWeChat } = useAppSdk();
	const startPayment = (params: offlineToPayParams) => {
		if (isWeChat) {
			uni.navigateTo({
				url: `/packagePayment/cashierDesk/index?id=${params.orderid}`,
			});
			return;
		}
		offlineToPay(params);
	};
	return {
		startPayment,
	};
};

export { usePay };
export default usePay;
